//
//  Zilla.h
//  Zilla
//
//  Created by Fanty on 13-12-26.
//  Copyright (c) 2013年 Fanty. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "ZillaDelegate.h"

@class Zilla;
@class ZillaAccessData;
@class ZillaUrlScheme;
@class AsyncRequestWorkGroup;


@interface Zilla : NSObject

//应用数据封装
@property(nonatomic,readonly) ZillaAccessData* zillAccessData;

//应用接口封装
@property(nonatomic,readonly) ZillaUrlScheme* zillaUrlScheme;

//回调代理
@property(nonatomic,weak) id<ZillaDelegate> delegate;

//初始化
-(id)initWithZillAccessData:(ZillaAccessData*)zillAccessData;


//初始化
-(id)initWithAppKey:(NSString*)appKey appSecret:(NSString*)appSecret urlSchemeSuffix:(NSString*)urlSchemeSuffix;

-(void)cancelAllWorkGroup;

-(void)cancelCheckAppValidate;

-(void)cancelCheckAppVersion;


-(void)cancelSyncModules;


//应用验证
-(void)checkAppVaildate;
//应用版本验证
-(void)checkAppVersion;
//获取模块列表
-(void)syncModules;
//获取模块列表，返回工作组控制类
-(AsyncRequestWorkGroup*)syncModulesWithWorkGroup;
//应用版本验证，返回工作组控制类
-(AsyncRequestWorkGroup*)checkAppVersionWithWorkGroup;

@end
